package com.aspose.cells;

class zbom {
   public static int a(long var0, int var2) {
      long var3 = var0 / (long)var2;
      if (var0 % (long)var2 != 0L) {
         ++var3;
      }

      return (int)var3;
   }

   public static int b(long var0, int var2) {
      return a(var0, var2) * var2;
   }

   public static void a(com.aspose.cells.b.a.d.zm var0, int var1) throws Exception {
      int var2 = b(var0.i(), var1);
      if (var0.h() < (long)var2) {
         var0.a((long)var2);
      }

      var0.b((long)var2);
   }

   public static void a(com.aspose.cells.b.a.d.zm var0, com.aspose.cells.b.a.d.zm var1) throws Exception {
      if (var0 == null) {
         throw new IllegalArgumentException("srcStream");
      } else if (var1 == null) {
         throw new IllegalArgumentException("dstStream");
      } else {
         byte[] var2 = new byte[4096];

         while(true) {
            int var3 = var0.a(var2, 0, var2.length);
            if (var3 <= 0) {
               return;
            }

            var1.b(var2, 0, var3);
         }
      }
   }

   public static DateTime a(long var0, String var2) {
      if (var0 < 0L) {
         throw new IllegalArgumentException("Parameter name: " + var2);
      } else {
         long var3 = var0 + 504911232000000000L;
         return new DateTime(var3, 1L);
      }
   }

   public static long a(DateTime var0, String var1) {
      long var2 = var0.e() - 504911232000000000L;
      if (var2 < 0L) {
         throw new IllegalArgumentException("Parameter name: " + var1);
      } else {
         return var2;
      }
   }

   public static boolean a(String var0) {
      return var0 != null && var0.length() > 0;
   }

   public static void a(String var0, String var1) {
      if (!a(var0)) {
         throw new IllegalArgumentException("The argument cannot be null or empty string.\\r\\nParameter name: \"" + var1);
      }
   }
}
